﻿<%@ Page Language="C#" MasterPageFile="~/LTR/MlyLtrMaster.Master" AutoEventWireup="true"
    CodeBehind="ClientsCard.aspx.cs" Inherits="MLY.LTR.ClientsCard"
    Title='<%$Dict:ClientsCard.Title%>' %>
<asp:Content ID="title" ContentPlaceHolderID="titleHolder" runat="server">

<title><asp:Literal ID="Literal21" Text='<%$Dict:Titles.ClientsCard%>' runat="server"></asp:Literal></title>
  
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <div class="organizationCard" id="win-xp" >
    <table border="0"  class="addWoFrmCls blueTxtBox" cellspacing="0" cellpadding="0">
        <tr runat="server" id="subContractorRow">
            <td style="width: 10%;">
            </td>
            <td style="width: 80%;">
                <asp:Label ID="lblSubContractor" runat="server" Text="<%$ Dict:SubContractor.lblSubContractor %>" />
            </td>
            <td style="width: 10%;">
                <asp:DropDownList ID="ddlClientsList" runat="server" DataSourceID="LinqDataSource1" CssClass="filterDdl"
                    DataTextField="OrganizationName" DataValueField="OrganizationId" AutoPostBack="True"
                    OnSelectedIndexChanged="ddlClientsList_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <img src="/Images/contact_person/contact_person_icon.png" />
            </td>
            <td>
                <asp:Label ID="lblContactPerson" runat="server" Text="<%$ Dict:SubContractor.ContactPerson %>" />
            </td>
            <td>
                <asp:TextBox ID="lblContactPersonName" runat="server" Text="" />
            </td>
        </tr>
        <tr>
            <td>
                <img src="/Images/contact_person/phone_num_icon.png" />
            </td>
            <td>
                <asp:Label ID="Label2" runat="server" Text="<%$ Dict:SubContractor.ContactPersonPhone %>" />
            </td>
            <td>
                <asp:TextBox ID="lblContactPersonPhone" runat="server" Text="" />
            </td>
        </tr>
        <tr>
            <td>
                <img src="/Images/contact_person/email_icon.png" />
            </td>
            <td>
                <asp:Label ID="Label3" runat="server" Text="<%$ Dict:SubContractor.ContactPersonEmail %>" />
            </td>
            <td>
                <asp:TextBox ID="lblContactPersonEmail" runat="server" Text="" />
            </td>
        </tr>
        <tr>
            <td>
                <img src="/Images/contact_person/client_code_icon.png" />
            </td>
            <td>
                <asp:Label ID="lblContractorNumber" runat="server" Text="<%$ Dict:SubContractor.ContractorCode %>" />
            </td>
            <td>
                <asp:TextBox ID="txtClientCode" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                <img src="/Images/contact_person/load_time_icon.png" />
            </td>
            <td>
                <asp:Label ID="lblContactPersonAddress0" runat="server" Text="<%$ Dict:SubContractor.DefaultPeriodDays %>"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtDefaultPeriodDays" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <img src="/Images/contact_person/cost_icon.png" />
            </td>
            <td>
                <asp:Label ID="lblContactPersonAddress3" runat="server" Text="<%$ Dict:SubContractor.DefaultCost %>"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtDefaultCost" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <img src="/Images/contact_person/Default-Days-Daviation_icon.png" />
            </td>
            <td>
                <asp:Label ID="Label1" runat="server" Text="<%$ Dict:SubContractor.DefaultDeviationParameter%>"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtDeviationParam" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            </td>
            <td style="float: right;">
                <table style="text-align: center; font-size: 12px;" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td style="width: 67px; text-align: left;">
                            <asp:ImageButton Width="20" align="middle" ID="btnClose" runat="server" OnClick="btnClose_Click"
                                ImageUrl="~/Images/contact_person/close_icon.png" />
                            &nbsp
                            <asp:Literal ID="Literal2" runat="server" Text='<%$Dict:General.Close %>' />
                        </td>
                        <td style="width: 26px; text-align: center;">
                            <img src="/Images/contact_person/division_between_icon.jpg" />
                        </td>
                        <td>
                            <asp:ImageButton Width="20" align="middle" ID="btnSave" runat="server" ImageUrl="~/Images/contact_person/save_icon.png"
                                OnClick="btnSave_Click" />
                            &nbsp
                            <asp:Literal ID="Litearl1" runat="server" Text='<%$Dict:General.Save %>' />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:Label ID="lblRelationExistsErr" runat="server" Text='<%$Dict:SubContractorCard.lblRelationExistsErr%>'
                    Visible="false" ForeColor="Red"></asp:Label><br />
                <asp:Label ID="lblSuccessfullSaving" runat="server" Text='<%$Dict:SubContractorCard.lblSuccessfullSaving%>'
                    Visible="false" ForeColor="Green"></asp:Label>
            </td>
        </tr>
    </table>
    </div>
                                        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                                            ContextTypeName="MLY.Dal.lqKbmDataContext" 
                                            Select="new (OrganizationId, OrganizationName)" 
                                            TableName="TableOrganizations" 
                                            Where="IsClient == @IsClient &amp;&amp; OrganizationId != @OrganizationId">
                                            <WhereParameters>
                                                <asp:Parameter DefaultValue="True" Name="IsClient" Type="Boolean" />
                                                <asp:SessionParameter Name="OrganizationId" SessionField="OrganizationId" 
                                                    Type="Int32" />
                                            </WhereParameters>
                                        </asp:LinqDataSource>
                                   
</asp:Content>
